import request from '@/utils/request'

// 查询列表
export function list (data) {
    return request({
        url: '/manage/teacher/schoolPage',
        method: 'post',
        data
    })
}

// 详情
export function getById (query) {
    return request({
        url: '/manage/teacher/getById/' + query.id,
        method: 'get',
        params: query
    })
}

// 新增
export function add (data) {
    return request({
        url: '/manage/teacher/add',
        method: 'post',
        data: data
    })
}

// 修改
export function edit (data) {
    return request({
        url: '/manage/teacher/edit',
        method: 'put',
        data: data
    })
}

// 重置
export function resetPwd (data) {
    return request({
        url: '/manage/teacher/resetPwd',
        method: 'put',
        data: data
    })
}

// 删除
export function deleteById (data) {
    return request({
        url: '/manage/teacher/deleteById/' + data.id,
        method: 'delete',
        data
    })
}

// 批量冻结
export function setStatusByIds (data) {
    return request({
        url: '/manage/teacher/setStatusByIds/' + data.id,
        method: 'put',
        data: data
    })
}

// 冻结/解冻
export function setStatus (data) {
    return request({
        url: '/manage/teacher/setStatus/' + data.id,
        method: 'put',
        data: data
    })
}